﻿<UserControl x:Class="Quizio.Views.HomeViews.ResultView.Overview"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="700">
    <Grid Style="{StaticResource ContentRoot}">
        <ScrollViewer MinHeight="300">
            <StackPanel MinWidth="200">
                <TextBlock Text="Übersicht des Spiels" Style="{StaticResource Heading2}" />
                <Grid Margin="0,20">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="100"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="200" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="1" Text="Herausforderer"></TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="2" Text="Rückspieler"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Name"></TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Zeit"></TextBlock>
                    <TextBlock Grid.Row="3" Grid.Column="0" Text="Punkte"></TextBlock>
                    <TextBlock Grid.Row="4" Grid.Column="0" Text="Richtig beantwortet"></TextBlock>
                    <TextBlock Grid.Row="5" Grid.Column="0" Text="Falsch beantwortet"></TextBlock>
                    <TextBlock Grid.Row="6" Grid.Column="0" Text="Timeouts"></TextBlock>

                    <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding ResultDataAggregator.Challenge.ChallengeGame.Player.Name}"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding ResultDataAggregator.Challenge.ResponseGame.Player.Name}"></TextBlock>

                    <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding ResultDataAggregator.Challenge.ChallengeGame.Time}"></TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding ResultDataAggregator.Challenge.ResponseGame.Time}"></TextBlock>
                    
                    <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding ChallengerPoints}"></TextBlock>
                    <TextBlock Grid.Row="3" Grid.Column="2" Text="{Binding ResponsePlayerPoints}"></TextBlock>

                    <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding CorrectChallengerInputs.Count}"></TextBlock>
                    <TextBlock Grid.Row="4" Grid.Column="2" Text="{Binding CorrectResponsePlayerInputs.Count}"></TextBlock>

                    <TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding FalseChallengerInputs.Count}"></TextBlock>
                    <TextBlock Grid.Row="5" Grid.Column="2" Text="{Binding FalseResponsePlayerInputs.Count}"></TextBlock>

                    <TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding TimedOutChallengerInputs.Count}"></TextBlock>
                    <TextBlock Grid.Row="6" Grid.Column="2" Text="{Binding TimedOutResponsePlayerInputs.Count}"></TextBlock>
                    <mui:ModernButton Grid.Row="7" Grid.Column="2" Content="Schliessen" Command="{Binding CloseWindow}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
                          EllipseDiameter="40" EllipseStrokeThickness="2" IconWidth="20" IconHeight="20" HorizontalAlignment="Right" VerticalAlignment="Bottom"
                          Margin="0,10,0,0"
                          IconData="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L 26.9166,22.1667 Z ">
                    </mui:ModernButton>
                </Grid>
            </StackPanel>
        </ScrollViewer>
        <mui:ModernProgressRing Width="50" Height="50" IsEnabled="True" IsActive="{Binding ShowOrHide}" VerticalAlignment="Bottom" HorizontalAlignment="Center">
        </mui:ModernProgressRing>
    </Grid>
</UserControl>
